Skip to content

feat: parsnp module#11196

Open
emmcauley wants to merge 14 commits intonf-core:masterfrom
fulcrumgenomics:em_parsnp_module
Open

feat: parsnp module#11196
emmcauley wants to merge 14 commits intonf-core:masterfrom
fulcrumgenomics:em_parsnp_module

Conversation

@emmcauley
Copy link
Copy Markdown
Contributor

PR checklist

Closes #8614.

This PR adds a new parsnp module and tests. The test is a bit contrived because I'm using the same FASTA files but I think it is sufficient -- I can also add some more complex test cases if preferred.

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@emmcauley emmcauley marked this pull request as ready for review April 15, 2026 15:23
@emmcauley emmcauley added the new module Adding a new module label Apr 15, 2026
Copy link
Copy Markdown
Contributor

@akaviaLab akaviaLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, looks good to me, but I have some comments. I'd suggest getting one of the core maintainers to look at it.

Comment thread modules/nf-core/parsnp/tests/main.nf.test
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution to nf-core! I added a few comments to your PR. :)

Comment thread modules/nf-core/parsnp/main.nf Outdated
Comment thread modules/nf-core/parsnp/main.nf
Comment thread modules/nf-core/parsnp/main.nf Outdated
Comment thread modules/nf-core/parsnp/main.nf
Comment thread modules/nf-core/parsnp/meta.yml
@akaviaLab
Copy link
Copy Markdown
Contributor

akaviaLab commented Apr 22, 2026 via email

Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/meta.yml Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
@emmcauley emmcauley requested a review from famosab April 25, 2026 15:17
Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more comments, almost good to go :)

"test.ggr:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"partition": [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be empty for this test?

Copy link
Copy Markdown
Contributor Author

@emmcauley emmcauley May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the tests to include a partition run and force output -- the deterministic md5s are included in the snapshot. I ran into errors using sanitizeOutput for this purpose so I use snapshot(...).match().

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, but then we still need to assert the partititon output because whats the point of the test otherwise ;)

Comment thread modules/nf-core/parsnp/main.nf Outdated
Comment thread modules/nf-core/parsnp/meta.yml
Comment thread modules/nf-core/parsnp/meta.yml
e.g. `[ id:'sample1' ]`
- "partition":
type: directory
description: Output directory from partition mode containing results of each partitioned run. Only present when --partition is specified.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a --partition test then to see if this works? :)

Comment thread modules/nf-core/parsnp/tests/main.nf.test
Comment thread modules/nf-core/parsnp/main.nf Outdated
@akaviaLab
Copy link
Copy Markdown
Contributor

It looks like you need to update nf-tools, and make sure you've merged the most recent master branch. A lot of the errors seems to be related to those kind of issues, so it is hard to tell what exactly is failing.

Comment thread modules/nf-core/parsnp/tests/main.nf.test.snap Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
Comment thread modules/nf-core/parsnp/tests/main.nf.test Outdated
"test.ggr:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"partition": [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, but then we still need to assert the partititon output because whats the point of the test otherwise ;)

Comment thread modules/nf-core/parsnp/tests/main.nf.test
Comment thread modules/nf-core/parsnp/main.nf
Comment thread modules/nf-core/parsnp/main.nf
Comment thread modules/nf-core/parsnp/main.nf Outdated
@emmcauley emmcauley requested a review from famosab May 8, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new module Adding a new module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: PARSNP

3 participants